[bsp][frdm-mcxa366] add CherryUSB support files#11381
[bsp][frdm-mcxa366] add CherryUSB support files#11381CoreBoxer wants to merge 1 commit intoRT-Thread:masterfrom
Conversation
📌 Code Review Assignment🏷️ Tag: bsp_mcxaReviewers: hywing Changed Files (Click to expand)
🏷️ Tag: componentsReviewers: Maihuanyi Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2026-05-11 15:28 CST)
📝 Review Instructions
|
|
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
|
可以参考156添加个ci |
|
@CoreBoxer 请签署CLA,谢谢! |
There was a problem hiding this comment.
Pull request overview
This PR adds CherryUSB device support scaffolding for the NXP FRDM-MCXA366 BSP, aligning the board port layout with existing MCXA boards and extending the Kinetis-MCX CherryUSB glue to recognize MCXA366.
本次 PR 为 NXP FRDM-MCXA366 BSP 增加 CherryUSB 设备侧支持的基础文件与构建集成,并在 Kinetis-MCX 的 CherryUSB glue 层中加入对 MCXA366 的识别。
Changes / 变更点:
- Add MCXA366 MCU selection in CherryUSB Kinetis-MCX glue (
usb_glue_mcx.c). / 在 CherryUSB Kinetis-MCX glue 中增加 MCXA366 条件分支。 - Add board-level CherryUSB port files (SConscript, usb_config.h, cherryusb.c) under
board/ports/cherryusb. / 在板级board/ports/cherryusb下新增 CherryUSB port 文件。 - Add CI attach configs to exercise CherryUSB CDC/HID configurations for this BSP. / 在 CI attachconfig 中新增 CherryUSB CDC/HID 配置项。
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| components/drivers/usb/cherryusb/port/kinetis/usb_glue_mcx.c | Extend MCU preprocessor selection to include MCXA366. |
| bsp/nxp/mcx/mcxa/frdm-mcxa366/board/ports/SConscript | Add ports-level build grouping and sub-SConscript discovery. |
| bsp/nxp/mcx/mcxa/frdm-mcxa366/board/ports/cherryusb/SConscript | Add CherryUSB port build group and nested SConscript discovery. |
| bsp/nxp/mcx/mcxa/frdm-mcxa366/board/ports/cherryusb/usb_config.h | Provide CherryUSB configuration header for the BSP. |
| bsp/nxp/mcx/mcxa/frdm-mcxa366/board/ports/cherryusb/cherryusb.c | Board port init hooks and a HID mouse test command integration. |
| bsp/nxp/mcx/mcxa/frdm-mcxa366/.ci/attachconfig/ci.attachconfig.yml | Add CI attach configurations for CherryUSB CDC and HID on MCXA366. |
|
已根据Copilot提出的CR意见做了代码优化 |
拉取/合并请求描述:(PR description)
[
为什么提交这份PR (why to submit this PR)
对frdm-mcxa366增加CherryUSB支持
你的解决方案是什么 (what is your solution)
请提供验证的bsp和config (provide the config and bsp)
BSP:
bsp/nxp/mcx/mcxa/frdm-mcxa366
.config:
CONFIG_RT_USING_CHERRYUSB=y
CONFIG_RT_CHERRYUSB_DEVICE=y
CONFIG_RT_CHERRYUSB_DEVICE_SPEED_FS=y
CONFIG_RT_CHERRYUSB_DEVICE_KINETIS_MCX=y
CONFIG_RT_CHERRYUSB_DEVICE_HID=y
CONFIG_CONFIG_USBDEV_REQUEST_BUFFER_LEN=512
CONFIG_CONFIG_USBDEV_MSC_MAX_BUFSIZE=512
CONFIG_RT_CHERRYUSB_DEVICE_TEMPLATE_HID_MOUSE=y
action:
https://github.com/CoreBoxer/rt-thread/actions/runs/25615500864
]
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up